import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lcapp/config/const_config.dart';
import 'package:lcapp/page/faxian/faxian_message_page.dart';
import 'package:lcapp/page/faxian/faxian_shop_page.dart';
import 'package:lcapp/widget/asr_app_bar.dart';
import 'package:lcapp/widget/custom_indicator.dart';
import 'package:lcapp/widget/custom_tabs.dart';

class FaxianPage extends StatefulWidget {
  const FaxianPage({Key? key}) : super(key: key);

  @override
  _FaxianPageState createState() => _FaxianPageState();
}

class _FaxianPageState extends State<FaxianPage> with SingleTickerProviderStateMixin{

  // TabController _tabController;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    // _tabController = TabController(length: 2, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: bgColor,
      appBar: AsrAppBar(
        barColor: Colors.black,
        isLead: false,
        title: Text('消息',style: TextStyle(
          fontSize: 36.sp,
          color: Colors.black,
          fontWeight: FontWeight.w600,
        ),)
        // Container(
        //   width: 1.sw,
        //   color: Colors.white,
        //   alignment: Alignment.center,
        //   child: Container(
        //     width: 300.w,
        //     height:ScreenUtil().statusBarHeight+ 120.w,
        //     child: CustomTabBar(
        //       controller: _tabController,
        //       indicator: CustomIndicator(
        //           type: CustomIndicatorType.LineRect,
        //           height: 3,
        //           width: 40.w
        //       ),
        //       indicatorColor: Color(0xffEA6B2B),
        //       indicatorPadding: EdgeInsets.zero,
        //       unselectedLabelColor: Color(0xff1A051D),
        //       unselectedLabelStyle: TextStyle(
        //         fontSize: 30.sp,
        //         color: Colors.black,
        //       ),
        //       indicatorSize: TabBarIndicatorSize.label,
        //       labelColor: Colors.black,
        //       labelStyle: TextStyle(
        //         fontSize: 36.sp,
        //         color: Colors.black,
        //         fontWeight: FontWeight.w600,
        //       ),
        //       tabs: const [
        //         Text("消息"),
        //         Text("发现"),
        //       ],
        //     ),
        //   ),
        // ),
        // bottom: PreferredSize(
        //   preferredSize:Size(1.sw,ScreenUtil().statusBarHeight+ 120.w),
        //   child: Container(
        //     width: 1.sw,
        //     color: Colors.red,
        //     alignment: Alignment.center,
        //     child: Container(
        //       width: 300.w,
        //       padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight,bottom: 20.w),
        //       height:ScreenUtil().statusBarHeight+ 120.w,
        //       child: CustomTabBar(
        //         controller: _tabController,
        //         indicator: CustomIndicator(
        //             type: CustomIndicatorType.LineRect,
        //             height: 3,
        //             width: 40.w
        //         ),
        //         indicatorColor: Color(0xffEA6B2B),
        //         indicatorPadding: EdgeInsets.zero,
        //         unselectedLabelColor: Color(0xff1A051D),
        //         unselectedLabelStyle: TextStyle(
        //           fontSize: 30.sp,
        //           color: Colors.black,
        //         ),
        //         indicatorSize: TabBarIndicatorSize.label,
        //         labelColor: Colors.black,
        //         labelStyle: TextStyle(
        //           fontSize: 36.sp,
        //           color: Colors.black,
        //           fontWeight: FontWeight.w600,
        //         ),
        //         tabs: const [
        //           Text("消息"),
        //           Text("发现"),
        //         ],
        //       ),
        //     ),
        //   ),
        // ),
      ),
      body: Column(
        children: [
          Container(
            height: 1,
            // margin: EdgeInsets.only(left: 120.w),
            color: Color(0xffE9E8E9),
          ),
          Expanded(child:
          FaxianMessagePage(),
          // TabBarView(
          //   // controller: _tabController,
          //   children: [
          //     FaxianMessagePage(),
          //     FaxianhopPage(),
          //   ],
          // )
          )
          ,
        ],
      ),
    );
  }
}
